/* eslint-disable max-classes-per-file */
import { JsonProperty, Serializable } from '@/plugins/reflect-metadata';

@Serializable()
export class WithdrawActionConfig {
  @JsonProperty('amount')
    amount: string = '';

  @JsonProperty('alipayAccount')
    alipayAccount: string = '';

  @JsonProperty('withdrawalAccountId')
    withdrawalAccountId: number = 0;

  get body() {
    return {
      amount: this.amount,
      withdrawalAccountId: this.withdrawalAccountId,
    };
  }
}

@Serializable()
export class WithdrawActionItem {
  @JsonProperty('id')
    id: string = '';

  @JsonProperty('method')
    method: number = 1;

  @JsonProperty('account')
    account: string = '';

  @JsonProperty('accountName')
    accountName: string = '';
}

@Serializable()
export default class WithdrawActionList {
  @JsonProperty({ name: 'data', type: WithdrawActionItem })
    data: WithdrawActionItem[] = [];

  @JsonProperty('total')
    total: number = 0;
}
